import java.util.Scanner;

public class LotteryTicket {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int sum = 0;
        double cost = 0.0;

        while (true) {
            System.out.print("请输入奖票号码（输入over退出）：");
            String ticketNumber = scanner.nextLine();

            if (ticketNumber.equalsIgnoreCase("over")) {
                break;
            }

            sum++;
            cost += 2.0;

            String prize;
            if (ticketNumber.equalsIgnoreCase("f")) {
                prize = "奥迪Q5";
                System.out.println("恭喜你中了一等奖！奖品是：" + prize);
            } else if (ticketNumber.equalsIgnoreCase("s")) {
                prize = "吉利博越";
                System.out.println("恭喜你中了二等奖！奖品是：" + prize);
            } else if (ticketNumber.equalsIgnoreCase("t")) {
                prize = "奇瑞QQ";
                System.out.println("恭喜你中了三等奖！奖品是：" + prize);
            } else {
                System.out.println("很遗憾，没有中奖。");
            }
        }

        System.out.println("您一共买了 " + sum + " 张奖票，花费了 " + cost + " 元。");
    }
}